#coding:utf-8
class UsersController < ApplicationController
  def new
    @user = User.new
  end

  def create
    @user = User.new(params[:user])
    begin
      if @user.save
        flash[:notice] = "恭喜，注册成功!"
        redirect_to root_path
      else
        flash[:notice] = "出错喽!"
        render :new
      end
    rescue Exception => e
      puts "-------------------------------------{#e}"
    end
  end

  def update

  end
end
